/**
 * @copyright 2017 sinping.com 北京芯平科技股份有限公司. All rights reserved.
 * 本内容仅限于北京芯平科技股份有限公司内部传阅，禁止外泄以及用于其他的商业目的.
 */
package com.sinping.qh.api.support;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * 接口返回的总包装，尽量的扁平，不要多层嵌套
 *
 * @author yuyue
 * @create 2017/12/20
 */
public class ResDto {
    private int status;
    private String msg;
    private String datas="{}";

    public ResDto() {

    }

    public ResDto(int status, String msg) {
        this.status = status;
         this.msg = msg;

    }

    public ResDto(int status, String msg, String datas) {
        this.status = status;
        this.msg = msg;
        this.datas = datas;
    }

    public ResDto(ConstEum constEum, String datas) {
        this.status = constEum.getStatus();

        this.msg = msg;
        this.datas = datas;
    }

    public ResDto(ConstEum constEum) {
        this.status = constEum.getStatus();
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getDatas() {
        return datas;
    }

    public void setDatas(String datas) {
        this.datas = datas;
    }

    public void setSub(String sub) {
        this.msg += sub;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }


}